using System;
using System.Data;
using System.Collections;
using APP.QUANLY.Common;

namespace RMAS.DAL
{
    /// <summary>
    /// Summary description for DM_SHIFTS.
    /// </summary>
    public class DM_SHIFTS
    {
              private string _ID;
      private string _IDPOS;
      private string _UserName;
      private decimal _TotalMoneyBegin;
      private decimal _TotalMoneyEnd;
      private decimal _TotalMoneyInShift;
      private decimal _TotalMoneyDiscount;
      private decimal _TotalMoneyPromotion;
      private decimal _TotalMoneyCustomer;
      private decimal _TotalMoneyGiveBack;
      private DateTime _DateTimeBegin;
      private DateTime _DateTimeEnd;
      private bool _IsBegin;
      private bool _IsEnd;
      private bool _IsFirst;
      private bool _TourGuide;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
	      public bool IsSetID; 
      public bool IsIDNullable   
      { 
	 get { return false;  } 
      }
      public string ID
      {
         get { return _ID; }
         set 
	    { 
 		 _ID = value;
		IsSetID = true;
 	    }
      }
    public bool IsSetIDPOS; 
    public bool IsIDPOSNullable   
    { 
		get { return false;  } 
    }
    public string IDPOS
    {
        get{ return _IDPOS;  }
        set
		{
			_IDPOS = value;
			IsSetIDPOS = true;
		}
    }
    public bool IsSetUserName; 
    public bool IsUserNameNullable   
    { 
		get { return false;  } 
    }
    public string UserName
    {
        get{ return _UserName;  }
        set
		{
			_UserName = value;
			IsSetUserName = true;
		}
    }
    public bool IsSetTotalMoneyBegin; 
    public bool IsTotalMoneyBeginNullable   
    { 
		get { return false;  } 
    }
    public decimal TotalMoneyBegin
    {
        get{ return _TotalMoneyBegin;  }
        set
		{
			_TotalMoneyBegin = value;
			IsSetTotalMoneyBegin = true;
		}
    }
    public bool IsSetTotalMoneyEnd; 
    public bool IsTotalMoneyEndNullable   
    { 
		get { return false;  } 
    }
    public decimal TotalMoneyEnd
    {
        get{ return _TotalMoneyEnd;  }
        set
		{
			_TotalMoneyEnd = value;
			IsSetTotalMoneyEnd = true;
		}
    }
    public bool IsSetTotalMoneyInShift; 
    public bool IsTotalMoneyInShiftNullable   
    { 
		get { return false;  } 
    }
    public decimal TotalMoneyInShift
    {
        get{ return _TotalMoneyInShift;  }
        set
		{
			_TotalMoneyInShift = value;
			IsSetTotalMoneyInShift = true;
		}
    }
    public bool IsSetTotalMoneyDiscount; 
    public bool IsTotalMoneyDiscountNullable   
    { 
		get { return false;  } 
    }
    public decimal TotalMoneyDiscount
    {
        get{ return _TotalMoneyDiscount;  }
        set
		{
			_TotalMoneyDiscount = value;
			IsSetTotalMoneyDiscount = true;
		}
    }
    public bool IsSetTotalMoneyPromotion; 
    public bool IsTotalMoneyPromotionNullable   
    { 
		get { return false;  } 
    }
    public decimal TotalMoneyPromotion
    {
        get{ return _TotalMoneyPromotion;  }
        set
		{
			_TotalMoneyPromotion = value;
			IsSetTotalMoneyPromotion = true;
		}
    }
    public bool IsSetTotalMoneyCustomer; 
    public bool IsTotalMoneyCustomerNullable   
    { 
		get { return false;  } 
    }
    public decimal TotalMoneyCustomer
    {
        get{ return _TotalMoneyCustomer;  }
        set
		{
			_TotalMoneyCustomer = value;
			IsSetTotalMoneyCustomer = true;
		}
    }
    public bool IsSetTotalMoneyGiveBack; 
    public bool IsTotalMoneyGiveBackNullable   
    { 
		get { return false;  } 
    }
    public decimal TotalMoneyGiveBack
    {
        get{ return _TotalMoneyGiveBack;  }
        set
		{
			_TotalMoneyGiveBack = value;
			IsSetTotalMoneyGiveBack = true;
		}
    }
    public bool IsSetDateTimeBegin; 
    public bool IsDateTimeBeginNullable   
    { 
		get { return false;  } 
    }
    public DateTime DateTimeBegin
    {
        get{ return _DateTimeBegin;  }
        set
		{
			_DateTimeBegin = value;
			IsSetDateTimeBegin = true;
		}
    }
    public bool IsSetDateTimeEnd; 
    public bool IsDateTimeEndNullable   
    { 
		get { return false;  } 
    }
    public DateTime DateTimeEnd
    {
        get{ return _DateTimeEnd;  }
        set
		{
			_DateTimeEnd = value;
			IsSetDateTimeEnd = true;
		}
    }
    public bool IsSetIsBegin; 
    public bool IsIsBeginNullable   
    { 
		get { return false;  } 
    }
    public bool IsBegin
    {
        get{ return _IsBegin;  }
        set
		{
			_IsBegin = value;
			IsSetIsBegin = true;
		}
    }
    public bool IsSetIsEnd; 
    public bool IsIsEndNullable   
    { 
		get { return false;  } 
    }
    public bool IsEnd
    {
        get{ return _IsEnd;  }
        set
		{
			_IsEnd = value;
			IsSetIsEnd = true;
		}
    }
    public bool IsSetIsFirst; 
    public bool IsIsFirstNullable   
    { 
		get { return false;  } 
    }
    public bool IsFirst
    {
        get{ return _IsFirst;  }
        set
		{
			_IsFirst = value;
			IsSetIsFirst = true;
		}
    }
    public bool IsSetTourGuide; 
    public bool IsTourGuideNullable   
    { 
		get { return false;  } 
    }
    public bool TourGuide
    {
        get{ return _TourGuide;  }
        set
		{
			_TourGuide = value;
			IsSetTourGuide = true;
		}
    }

        #endregion

        #region Constructors
        public DM_SHIFTS()
        {
            Reset();
        }
        public DM_SHIFTS(DM_SHIFTS obj)
        {
            	this._ID = obj.ID;
	this._IDPOS = obj.IDPOS;
	this._UserName = obj.UserName;
	this._TotalMoneyBegin = obj.TotalMoneyBegin;
	this._TotalMoneyEnd = obj.TotalMoneyEnd;
	this._TotalMoneyInShift = obj.TotalMoneyInShift;
	this._TotalMoneyDiscount = obj.TotalMoneyDiscount;
	this._TotalMoneyPromotion = obj.TotalMoneyPromotion;
	this._TotalMoneyCustomer = obj.TotalMoneyCustomer;
	this._TotalMoneyGiveBack = obj.TotalMoneyGiveBack;
	this._DateTimeBegin = obj.DateTimeBegin;
	this._DateTimeEnd = obj.DateTimeEnd;
	this._IsBegin = obj.IsBegin;
	this._IsEnd = obj.IsEnd;
	this._IsFirst = obj.IsFirst;
	this._TourGuide = obj.TourGuide;
        }
        #endregion

        public void Reset()
        {
                     _ID = EmptyValues.v_string;
         _IDPOS = EmptyValues.v_string;
         _UserName = EmptyValues.v_string;
         _TotalMoneyBegin = EmptyValues.v_decimal;
         _TotalMoneyEnd = EmptyValues.v_decimal;
         _TotalMoneyInShift = EmptyValues.v_decimal;
         _TotalMoneyDiscount = EmptyValues.v_decimal;
         _TotalMoneyPromotion = EmptyValues.v_decimal;
         _TotalMoneyCustomer = EmptyValues.v_decimal;
         _TotalMoneyGiveBack = EmptyValues.v_decimal;
         _DateTimeBegin = EmptyValues.v_DateTime;
         _DateTimeEnd = EmptyValues.v_DateTime;
         _IsBegin = EmptyValues.v_bool;
         _IsEnd = EmptyValues.v_bool;
         _IsFirst = EmptyValues.v_bool;
         _TourGuide = EmptyValues.v_bool;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["ID"] is DBNull))
		{
			obj.ID = (string)reader["ID"];
		}
                if(!(reader["IDPOS"] is DBNull))
		{
			obj.IDPOS = (string)reader["IDPOS"];
		}
                if(!(reader["UserName"] is DBNull))
		{
			obj.UserName = (string)reader["UserName"];
		}
                if(!(reader["TotalMoneyBegin"] is DBNull))
		{
			obj.TotalMoneyBegin = (decimal)reader["TotalMoneyBegin"];
		}
                if(!(reader["TotalMoneyEnd"] is DBNull))
		{
			obj.TotalMoneyEnd = (decimal)reader["TotalMoneyEnd"];
		}
                if(!(reader["TotalMoneyInShift"] is DBNull))
		{
			obj.TotalMoneyInShift = (decimal)reader["TotalMoneyInShift"];
		}
                if(!(reader["TotalMoneyDiscount"] is DBNull))
		{
			obj.TotalMoneyDiscount = (decimal)reader["TotalMoneyDiscount"];
		}
                if(!(reader["TotalMoneyPromotion"] is DBNull))
		{
			obj.TotalMoneyPromotion = (decimal)reader["TotalMoneyPromotion"];
		}
                if(!(reader["TotalMoneyCustomer"] is DBNull))
		{
			obj.TotalMoneyCustomer = (decimal)reader["TotalMoneyCustomer"];
		}
                if(!(reader["TotalMoneyGiveBack"] is DBNull))
		{
			obj.TotalMoneyGiveBack = (decimal)reader["TotalMoneyGiveBack"];
		}
                if(!(reader["DateTimeBegin"] is DBNull))
		{
			obj.DateTimeBegin = (DateTime)reader["DateTimeBegin"];
		}
                if(!(reader["DateTimeEnd"] is DBNull))
		{
			obj.DateTimeEnd = (DateTime)reader["DateTimeEnd"];
		}
                if(!(reader["IsBegin"] is DBNull))
		{
			obj.IsBegin = (bool)reader["IsBegin"];
		}
                if(!(reader["IsEnd"] is DBNull))
		{
			obj.IsEnd = (bool)reader["IsEnd"];
		}
                if(!(reader["IsFirst"] is DBNull))
		{
			obj.IsFirst = (bool)reader["IsFirst"];
		}
                if(!(reader["TourGuide"] is DBNull))
		{
			obj.TourGuide = (bool)reader["TourGuide"];
		}
//            _ID = (reader["ID"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["ID"];
//            _IDPOS = (reader["IDPOS"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["IDPOS"];
//            _UserName = (reader["UserName"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["UserName"];
//            _TotalMoneyBegin = (reader["TotalMoneyBegin"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["TotalMoneyBegin"];
//            _TotalMoneyEnd = (reader["TotalMoneyEnd"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["TotalMoneyEnd"];
//            _TotalMoneyInShift = (reader["TotalMoneyInShift"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["TotalMoneyInShift"];
//            _TotalMoneyDiscount = (reader["TotalMoneyDiscount"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["TotalMoneyDiscount"];
//            _TotalMoneyPromotion = (reader["TotalMoneyPromotion"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["TotalMoneyPromotion"];
//            _TotalMoneyCustomer = (reader["TotalMoneyCustomer"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["TotalMoneyCustomer"];
//            _TotalMoneyGiveBack = (reader["TotalMoneyGiveBack"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["TotalMoneyGiveBack"];
//            _DateTimeBegin = (reader["DateTimeBegin"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["DateTimeBegin"];
//            _DateTimeEnd = (reader["DateTimeEnd"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["DateTimeEnd"];
//            _IsBegin = (reader["IsBegin"] is DBNull)?DalTools.EmptyValues.v_bool:(bool)reader["IsBegin"];
//            _IsEnd = (reader["IsEnd"] is DBNull)?DalTools.EmptyValues.v_bool:(bool)reader["IsEnd"];
//            _IsFirst = (reader["IsFirst"] is DBNull)?DalTools.EmptyValues.v_bool:(bool)reader["IsFirst"];
//            _TourGuide = (reader["TourGuide"] is DBNull)?DalTools.EmptyValues.v_bool:(bool)reader["TourGuide"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(string ID, string IDPOS, string UserName, decimal TotalMoneyBegin, decimal TotalMoneyEnd, decimal TotalMoneyInShift, decimal TotalMoneyDiscount, decimal TotalMoneyPromotion, decimal TotalMoneyCustomer, decimal TotalMoneyGiveBack, DateTime DateTimeBegin, DateTime DateTimeEnd, bool IsBegin, bool IsEnd, bool IsFirst, bool TourGuide)
        {
                     this._ID = ID;
         this._IDPOS = IDPOS;
         this._UserName = UserName;
         this._TotalMoneyBegin = TotalMoneyBegin;
         this._TotalMoneyEnd = TotalMoneyEnd;
         this._TotalMoneyInShift = TotalMoneyInShift;
         this._TotalMoneyDiscount = TotalMoneyDiscount;
         this._TotalMoneyPromotion = TotalMoneyPromotion;
         this._TotalMoneyCustomer = TotalMoneyCustomer;
         this._TotalMoneyGiveBack = TotalMoneyGiveBack;
         this._DateTimeBegin = DateTimeBegin;
         this._DateTimeEnd = DateTimeEnd;
         this._IsBegin = IsBegin;
         this._IsEnd = IsEnd;
         this._IsFirst = IsFirst;
         this._TourGuide = TourGuide;
        }
    }
}